Semantic web is an initiative of World Wide Web Consortium (W3C) to make information on the web readable not only by humans but also by machines. Resource Description Framework (RDF) is a model for a semantic web data and Simple Protocol and RDF Query Language (SPARQL) is standard query language for the RDF. The SPARQL is used to query the semantic web data enabling querying from multiple websites, enterprise databases, and the RDF databases. Since the SPARQL uses a standard, the SPARQL facilitates in querying widely disparate web technologies. Furthermore, the RDF database has several distinctive features as compared to traditional structure databases. With city administration and private entities gradually releasing various data in a structured form namely the RDF format a large number of applications and services have started to emerge that utilize integration and analysis of the semantic data for the benefit of business, administration and citizens.
With a wide variety of the RDF data available, the number of rich SPARQL queries possible is humongous. Currently available techniques facilitate the SPARQL queries to accommodate graph pattern matching. However, these current techniques lacks in addressing an issue of expressing a complex logic in form of the SPARQL queries that require computations apart from the graph pattern matching. In an example, to compute ‘co-prime’ logic has to be written in SPARQL syntax each time a query needs a calculation of mutual prime, though there is a need to make this available by default. Current systems require implementation expertise for extension of SPARQL grammar. Therefore, it is observed that the current SPARQL based systems does not support extension of useful functions without having the knowledge of the implementation and integration details associated with the SPARQL and hence may not be extendable easily.